package me.hys.action.doctor;

import java.util.Map;

import me.hys.base.BaseAction;
import me.hys.base.PageQuery;
import me.hys.bo.doctor.RvtUserBo;
import me.hys.service.doctor.IReservationManager;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * Author: @author HYS . <br>
 * Date: 2015-9-26 下午10:45:28 . <br>
 * Function: 预约管理
 */
@Controller
@RequestMapping("/reservation")
public class ReservationAction extends BaseAction {
	@Autowired
	private IReservationManager reservationManager;

	public ReservationAction() {
		setFlag(getClass().getSimpleName());
	}

	/**
	 * @Title : index
	 * @Description : 预约列表
	 */
	@RequestMapping("/index")
	public ModelAndView index() {
		Map<String, Object> data = getMap();
		PageQuery<RvtUserBo> pageQuery = getPageQuery();
		data.put("data", reservationManager.findPage(pageQuery));
		return new ModelAndView("/doctor/reservation", data);
	}
}
